package file_demo1;

import java.io.*;

public class demo8 {
    public static void main(String[] args) throws IOException {
        //创建对象并指定编码
         InputStreamReader isr =
                 new InputStreamReader(new FileInputStream("a.txt"),"GBK");
        //
        int len;
        while((len = isr.read())!=-1){
            System.out.println((char) len);
        }

        isr.close();

    }
}
